package com.cxx.purchasecharge.component.bean;

import java.util.List;

import com.cxx.purchasecharge.core.model.OrderStatusCode;
import com.cxx.purchasecharge.core.model.OrderTypeCode;

public class OrderBean extends BaseBean
{
    private static final long serialVersionUID = 1L;

    private String id;

    // private String customerId;
    // private String customerName;
    private CustomerBean customerBean;
    private ContactBean contactBean;
    private String orderItemList;
    private List <OrderItemBean> orderItemBeans;
    /**
     * 应付额
     */
    private float dealMoney;
    /**
     * 折扣率
     */
    private float discount = 1;
    /**
     * 应收款
     */
    private float receivable;
    /**
     * 实付额
     */
    private float paidMoney;
    /**
     * 利润
     */
    private float profit;
    private String payTime;
    private String createTime;
    /**
     * 最后期限
     */
    private String payDeadline;

    /**
     * 业务员
     */
//    @NotEmpty
//    private String userSignedTo;
    /**
     * 操作员
     */
    private String userOperated;
    private String userCreated;
    private String userUpdated;
    private String comment;
    /**
     * 发货时间
     */
    private String shipTime;

    /**
     * 物流单号
     */
    private String logisticsNumber;

    /**
     * 是否开发票
     */
    private boolean isInvoiced = false;
    /**
     * 是否发货
     */
    private boolean isShipped = false;
    /**
     * 网络电商订单号
     */
    private String networkOrderId;

    private OrderStatusCode statusCode = OrderStatusCode.NEW;
    private OrderTypeCode typeCode;

    public String getId ()
    {
        return id;
    }

    public void setId (String id)
    {
        this.id = id;
    }

    public List <OrderItemBean> getOrderItemBeans ()
    {
        return orderItemBeans;
    }

    public void setOrderItemBeans (List <OrderItemBean> orderItemBeans)
    {
        this.orderItemBeans = orderItemBeans;
        if (null != orderItemBeans)
        {
            for (OrderItemBean orderItem : orderItemBeans)
            {
                orderItem.setOrderId (this.getId ());
            }
        }
    }

    public float getDealMoney ()
    {
        return dealMoney;
    }

    public float getDiscount ()
    {
        return discount;
    }

    public void setDiscount (float discount)
    {
        this.discount = discount;
    }

    public float getReceivable ()
    {
        return receivable;
    }

    public void setReceivable (float receivable)
    {
        this.receivable = receivable;
    }

    public void setDealMoney (float dealMoney)
    {
        this.dealMoney = dealMoney;
    }

    public float getPaidMoney ()
    {
        return paidMoney;
    }

    public void setPaidMoney (float paidMoney)
    {
        this.paidMoney = paidMoney;
    }

    public float getProfit ()
    {
        return profit;
    }

    public void setProfit (float profit)
    {
        this.profit = profit;
    }

    public String getPayDeadline ()
    {
        return payDeadline;
    }

    public void setPayDeadline (String payDeadline)
    {
        this.payDeadline = payDeadline;
    }

    public String getComment ()
    {
        return comment;
    }

    public void setComment (String comment)
    {
        this.comment = comment;
    }

    public String getPayTime ()
    {
        return payTime;
    }

    public void setPayTime (String payTime)
    {
        this.payTime = payTime;
    }

    public String getCreateTime ()
    {
        return createTime;
    }

    public void setCreateTime (String createTime)
    {
        this.createTime = createTime;
    }

    public String getShipTime ()
    {
        return shipTime;
    }

    public void setShipTime (String shipTime)
    {
        this.shipTime = shipTime;
    }

    public String getLogisticsNumber ()
    {
        return logisticsNumber;
    }

    public void setLogisticsNumber (String logisticsNumber)
    {
        this.logisticsNumber = logisticsNumber;
    }

    public boolean isInvoiced ()
    {
        return isInvoiced;
    }

    public void setInvoiced (boolean isInvoiced)
    {
        this.isInvoiced = isInvoiced;
    }

    public boolean isShipped ()
    {
        return isShipped;
    }

    public void setShipped (boolean isShipped)
    {
        this.isShipped = isShipped;
    }

    public String getNetworkOrderId ()
    {
        return networkOrderId;
    }

    public void setNetworkOrderId (String networkOrderId)
    {
        this.networkOrderId = networkOrderId;
    }

    public OrderStatusCode getStatusCode ()
    {
        return statusCode;
    }

    public void setStatusCode (OrderStatusCode statusCode)
    {
        this.statusCode = statusCode;
    }

    public OrderTypeCode getTypeCode ()
    {
        return typeCode;
    }

    public void setTypeCode (OrderTypeCode typeCode)
    {
        this.typeCode = typeCode;
    }

    // public String getCustomerId ()
    // {
    // return customerId;
    // }
    //
    // public void setCustomerId (String customerId)
    // {
    // this.customerId = customerId;
    // }
    //
    // public String getCustomerName ()
    // {
    // return customerName;
    // }
    //
    // public void setCustomerName (String customerName)
    // {
    // this.customerName = customerName;
    // }

    public CustomerBean getCustomerBean ()
    {
        return customerBean;
    }

    public void setCustomerBean (CustomerBean customerBean)
    {
        this.customerBean = customerBean;
    }

    public String getOrderItemList ()
    {
        return orderItemList;
    }

    public void setOrderItemList (String orderItemList)
    {
        this.orderItemList = orderItemList;
    }

    public ContactBean getContactBean ()
    {
        return contactBean;
    }

    public void setContactBean (ContactBean contactBean)
    {
        this.contactBean = contactBean;
    }

    public String getUserCreated ()
    {
        return userCreated;
    }

    public void setUserCreated (String userCreated)
    {
        this.userCreated = userCreated;
    }

    public String getUserUpdated ()
    {
        return userUpdated;
    }

    public void setUserUpdated (String userUpdated)
    {
        this.userUpdated = userUpdated;
    }

//    public String getUserSignedTo ()
//    {
//        return userSignedTo;
//    }
//
//    public void setUserSignedTo (String userSignedTo)
//    {
//        this.userSignedTo = userSignedTo;
//    }

    public String getUserOperated ()
    {
        return userOperated;
    }

    public void setUserOperated (String userOperated)
    {
        this.userOperated = userOperated;
    }
}
